{{#list}}{{!
}}{{#get}}
    get:
      tags:
        - {{tag}}
      summary: Lists available {{respDef}} objects
      x-codegen-operation: list 
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            type: array
            items:
              $ref: "#/definitions/{{respDef}}"{{/get}}{{!
}}{{#post}}
    post:
      tags:
        - {{tag}}{{#x-codegen-permission}}
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: create 
      summary: Creates a {{respDef}} object
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      parameters:
        - name: item
          in: body
          required: true
          schema:
            $ref: "#/definitions/{{paramDef}}"
      responses:
        201:
          description: {{respDef}} created
          headers:
            Location:
              description: A link to the {{respDef}}
              type: string
              format: url
          schema:
            $ref: "#/definitions/{{respDef}}"{{/post}}{{!
}}{{#bulk}}
  /{{path}}/bulk:
    post:
      tags:
        - {{tag}}{{#x-codegen-permission}}
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: bulk
      summary: Bulk loads a number of {{respDef}} objects      
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      parameters:
        - name: items
          in: body
          required: true
          schema:
            type: array
            items:
              $ref: "#/definitions/{{paramDef}}"
      responses:
        201:
          description: {{tag}} created
{{/bulk}}{{!
}}{{#getById}}
    get:
      tags:
        - {{tag}}
      summary: Retrieve a specific {{respDef}} object
      x-codegen-operation: retrieve 
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/{{respDef}}"
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to fetch
          required: true
          type: integer{{/getById}}{{!
}}{{#putById}}
    put:
      tags:
        - {{tag}}
      summary: Updates a specific {{respDef}} object
      x-codegen-operation: update
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/{{paramDef}}"
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to fetch
          required: true
          type: integer
        - name: item
          in: body
          required: true
          schema:
            $ref: "#/definitions/{{respDef}}"{{/putById}}{{!
}}{{#deleteById}}
  /{{path}}/{id}/delete:
    post:
      tags:
        - {{tag}}{{#x-codegen-permission}}      
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: destroy
      summary: Deletes a specific {{respDef}} object
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to delete
          required: true
          type: integer{{/deleteById}}{{!
}}{{#fullpath}}  /{{fullpath}}:
{{/fullpath}}{{! 
}}{{#idpath}}

  /{{idpath}}/{id}:{{/idpath}}{{! 
}}{{#crud}}  /{{path}}:
    get:
      tags:
        - {{tag}}
      summary: Lists available {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} objects
      x-codegen-operation: list
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            type: array
            items:
              $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
    post:
      tags:
        - {{tag}}{{#x-codegen-permission}}
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: create
      summary: Creates a new {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} object            
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      parameters:
        - name: item
          in: body
          required: true
          schema:
            $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
      responses:
        201:
          description: {{tag}} created
          headers:
            Location:
              description: A link to the {{tag}}
              type: string
              format: url
          schema:
            $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"  
  /{{path}}/bulk:
    post:
      tags:
        - {{tag}}
      summary: Bulk create / update a number of {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} object      
      x-codegen-operation: bulk
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      parameters:
        - name: items
          in: body
          required: true
          schema:
            type: array
            items:
              $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
      responses:
        201:
          description: {{tag}} created
  /{{path}}/{id}:
    get:
      tags:
        - {{tag}}
      summary: Gets a specific {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} object      
      x-codegen-operation: retrieve
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to fetch
          required: true
          type: integer
    put:
      tags:
        - {{tag}}{{#x-codegen-permission}}      
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: update
      summary: Updates a specific {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} object      
      consumes:
        - application/json
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to fetch
          required: true
          type: integer
        - name: item
          in: body
          required: true
          schema:
            $ref: "#/definitions/{{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}}"
  /{{path}}/{id}/delete:
    post:
      tags:
        - {{tag}}{{#x-codegen-permission}}      
      x-codegen-permission: {{x-codegen-permission}}{{/x-codegen-permission}}
      x-codegen-operation: destroy
      summary: Deletes a specific {{#paramDef}}{{paramDef}}{{/paramDef}}{{^paramDef}}{{tag}}{{/paramDef}} object      
      consumes: []
      produces:
        - text/plain
        - application/json
        - text/json
      responses:
        200:
          description: OK
        404:
          description: {{tag}} not found
      parameters:
        - name: id
          in: path
          description: id of {{tag}} to delete
          required: true
          type: integer
{{/crud}}{{/list}}